<template>
  <el-select-v2 v-model="attendanceStatus" :options="options"/>
</template>
<script lang="ts" setup>
import {ref} from "vue"
import {ElSelectV2} from "element-plus";
import {ATTENDANCE_STATUS_QUANTITY, AttendanceStatus, status} from "@/api/types/attendance";

const attendanceStatus = defineModel<AttendanceStatus>()
const options = ref<{ label: string, value: number ,disabled:any}[]>([])

for (let i = 1; i <= ATTENDANCE_STATUS_QUANTITY; i++) {
  if (status(i as AttendanceStatus) !== undefined) {
    options.value.push({label: status(i as AttendanceStatus)!, value: i, disabled:i==2||i==3})
  }
}
</script>
